-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet] Fix upgrades for packages with restructured inputs #109887
Conversation
Addresses errors surfaced when testing upgrades from AWS 0.6.1 to 0.10.4. Namely, when inputs are removed from a package between versions,we were initially throwing errors for each input in the new package that didn't exist on the outdated package version. Now, we instead simply skip over cases like this in which an input no longer exists on the new package version.
Pinging @elastic/fleet (Team:Fleet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any test coverage we can add for this case?
Good call. We should be able to add a test package version that incurs this case. I'll work on that this morning. |
@jen-huang I added some basic test cases for input and policy template restructures in 5889928. I think it'd be good to add some more robust assertions to these tests at some point rather than just asserting on success and error values. e.g. actually verifying the expected data in the updated policy objects. I added a tech debt issue to the backlog to capture that improvement: #110087 |
@hop-dev - I wound up tracking down a fix for that Essentially, for package versions in which a stream was removed, we were incurring a validation error. This commit just updates our validation to tolerate this case as we do elsewhere. |
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: cc @kpollich |
…09887) * Fix upgrades for packages with restructured inputs Addresses errors surfaced when testing upgrades from AWS 0.6.1 to 0.10.4. Namely, when inputs are removed from a package between versions,we were initially throwing errors for each input in the new package that didn't exist on the outdated package version. Now, we instead simply skip over cases like this in which an input no longer exists on the new package version. * Add basic test cases for restructured packages
…09887) * Fix upgrades for packages with restructured inputs Addresses errors surfaced when testing upgrades from AWS 0.6.1 to 0.10.4. Namely, when inputs are removed from a package between versions,we were initially throwing errors for each input in the new package that didn't exist on the outdated package version. Now, we instead simply skip over cases like this in which an input no longer exists on the new package version. * Add basic test cases for restructured packages
…110150) * Fix upgrades for packages with restructured inputs Addresses errors surfaced when testing upgrades from AWS 0.6.1 to 0.10.4. Namely, when inputs are removed from a package between versions,we were initially throwing errors for each input in the new package that didn't exist on the outdated package version. Now, we instead simply skip over cases like this in which an input no longer exists on the new package version. * Add basic test cases for restructured packages Co-authored-by: Kyle Pollich <[email protected]>
…110149) * Fix upgrades for packages with restructured inputs Addresses errors surfaced when testing upgrades from AWS 0.6.1 to 0.10.4. Namely, when inputs are removed from a package between versions,we were initially throwing errors for each input in the new package that didn't exist on the outdated package version. Now, we instead simply skip over cases like this in which an input no longer exists on the new package version. * Add basic test cases for restructured packages Co-authored-by: Kyle Pollich <[email protected]>
Hi @EricDavisX Observations:
Build details: Screen Recording: New.Policy.for.Nginx.test.-.Agent.policies.-.Fleet.-.Elastic.-.Google.Chrome.2021-08-31.12-13-42.mp4Thanks |
Summary
Addresses errors surfaced when testing upgrades from AWS 0.6.1 to 0.10.4. Namely, when inputs are removed from a package between versions we were initially throwing errors for each input in the new package that didn't exist on the outdated package version. Now, we instead simply skip over cases like this in which an input no longer exists on the new package version.
Screen Recording
I've also included a validation fix for when streams are removed that addresses issues with the Nginx package.
Fixes #109808
Fixes #109805